home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / telecomm / sticpsrc.lzh / SOURCE.ARC / AX_MBX.H < prev    next >
C/C++ Source or Header  |  1990-05-13  |  2KB  |  53 lines

  1. /* Defines for the ax.25 mailbox facility */
  2.  
  3. #define MBXLINE        256        /* max length of line */
  4.  
  5. struct mbxpath {
  6.     struct mbxpath *next;
  7.     unsigned int y,m,d;        /* forwarding date */
  8.     unsigned int hh,mm,z;    /* forwarding time */
  9.     char name[7];        /* name of forwarding box */
  10. };
  11. #define NULLMBXPATH    ((struct mbxpath *) 0)
  12.  
  13. struct mbx {
  14.     struct mbx *next;
  15.     struct mbx *prev;
  16.     struct ax25_cb  *ax25_cb;    /* ax.25 link control block */
  17.     int state;            /* mailbox state */
  18. #define MBX_CMD        0    /* in command mode */
  19. #define MBX_INFO    1    /* sending info file */
  20. #define MBX_SUBJ    2    /* waiting for a subject line */
  21. #define MBX_HEAD    3    /* collecting the headers */
  22. #define MBX_DATA    4    /* collecting the message */
  23. #define MBX_CONN    5    /* connecting remote box */
  24. #define MBX_SEND    6    /* sending mail to remote box */
  25. #define MBX_BODY    7    /* sending mail body */
  26. #define MBX_DISC    8    /* ready for disconnect */
  27.     char name[10];        /* Name of remote station */
  28.     char *to;            /* To-address in form user or user@host */
  29.     char *tofrom;        /* Optional <from in to-address */
  30.     char *tomsgid;        /* Optional $msgid in to-address */
  31.     char *subject;        /* Message subject */
  32.     char *fullfrom;        /* Full "from" address of sender */
  33.     struct mbxpath *mbpath;    /* Linked list of path elements */
  34.     FILE *tfile;        /* Temporary file for message */
  35.     int sid;            /* Characteristics indicated by the SID */
  36.                 /* banner of the attaching station.  If */
  37.                 /* no SID was sent, this is zero.  If an */
  38.                 /* SID of any kind was received, it is */
  39.                 /* assumed that the station supports */
  40.                 /* abbreviated mail forwarding mode. */
  41. #define MBX_SID        0x01    /* Got any SID */
  42. #define MBX_SID_RLI 0x02    /* This is an RLI BBS, disconnect after F> */
  43.                 /* Space here for others, currently not of */
  44.                 /* interest to us. */
  45.     char stype;            /* BBS send command type (B,P,T, etc.) */
  46.     struct smtp_cb  *smtp_cb;    /* SMTP control block */
  47.     FILE *script;        /* connect/mail script when sending */
  48.     long mpos;            /* where "l" line is in script */
  49.     char sline[MBXLINE];    /* line from script */
  50. };
  51. #define        NULLMBX    (struct mbx *)0
  52.  
  53.